//
//  AllEquipmCell.m
//  DefendHealth
//
//  Created by 吾诺瀚卓 on 17/3/6.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "AllEquipmCell.h"


@implementation AllEquipmCell
//设备图片
-(UIImageView *)imageView
{
    if (!_imageView) {
        CGFloat cellWidth = (kScreenWidth-3)/3;
        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, cellWidth, cellWidth)];
        view.backgroundColor = kWhiteColor;
        [self.contentView addSubview:view];
        
        //_imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, cellWidth, cellWidth)];
        _imageView = [ReduceCode creatImageVeiwWithFrame:CGRectMake(10, 10, cellWidth-20, cellWidth-20) imageName:@"pic" isCorner:NO];
        _imageView.backgroundColor = [UIColor whiteColor];
        [view addSubview:_imageView];
    }
    return _imageView;
}
//设备名称
-(UILabel *)equipmName
{
    if (!_equipmName) {
        CGFloat cellWidth = (kScreenWidth-3)/3;
        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, kMaxY(self.imageView.frame)+10, cellWidth, 30)];
        [self.contentView addSubview:view];
        view.backgroundColor = [UIColor whiteColor];
        _equipmName = [ReduceCode creatLabelWithFrame:CGRectMake(0, 0, cellWidth, 30) title:@"" titleColor:UIColorFromRGB(0x333333) font:14 textAlignment:NSTextAlignmentCenter];
        [view addSubview:_equipmName];
    }
    return _equipmName;
}
@end
